﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ExaminationSys.DataAccess.Entity
{
    public class SectionInfoSearchEntity
    {
        public Guid ID { get; set; }
        public Guid SectionID { get; set; }
        public string LinkUrl { get; set; }
        public int Status { get; set; }
        public string Opeator { get; set; }
        public DateTime OpeatorTime { get; set; }
        public string SectionName { get; set; }

    }

    public class SectionInfo
    {

        public Guid ID { get; set; }
        public int SectionTypeID { get; set; }
        public string SectionTypeName { get; set; }
        public string Name { get; set; }
        public string Img { get; set; }
        public int OrderIndex { get; set; }
        public string Operator { get; set; }
        public DateTime OperatorTime { get; set; }
        public int Status { get; set; }
    }


    /// <summary>
    ///  栏目，外链接，与试卷集成
    /// </summary>
    public class SectionInfoIntegrated
    {

        public Guid ID { get; set; }
        public int SectionTypeID { get; set; }
        public string SectionTypeName { get; set; }
        public string Name { get; set; }
        public string Img { get; set; }
        public string LinkUrl { get; set; }
        public int OrderIndex { get; set; }
        public string Operator { get; set; }
        public DateTime OperatorTime { get; set; }
        public int Status { get; set; }

        public List<PaperInfo> PaperInfolist { get; set; }

        public SectionInfoIntegrated(SectionInfo sectionifo,List<PaperInfo> paperinfolist)
        {
            this.ID = sectionifo.ID;
            this.SectionTypeID = sectionifo.SectionTypeID;
            this.Name = sectionifo.Name;
            this.Img = sectionifo.Img;
            this.LinkUrl = string.Empty;
            this.OrderIndex = sectionifo.OrderIndex;
            this.Operator = sectionifo.Operator;
            this.OperatorTime = sectionifo.OperatorTime;
            this.Status = sectionifo.Status;
            this.PaperInfolist = paperinfolist;
        }

        public SectionInfoIntegrated(SectionInfo sectionifo, SectionLink sectionlink)
        {
            this.ID = sectionifo.ID;
            this.SectionTypeID = sectionifo.SectionTypeID;
            this.Name = sectionifo.Name;
            this.Img = sectionifo.Img;
            this.LinkUrl = sectionlink.LinkUrl;
            this.OrderIndex = sectionifo.OrderIndex;
            this.Operator = sectionifo.Operator;
            this.OperatorTime = sectionifo.OperatorTime;
            this.Status = sectionifo.Status;
            this.PaperInfolist = null;

        }
    }
}
